package com.example.publishDemo.Model;

import java.io.Serializable;
import java.time.LocalDate;

public class User implements Serializable{
    private int u_id;
    private String username;
    private String password;
    private String picture;
    private LocalDate birthday;
    private String status;
    private String isAdmin;

    public int getU_id() {
        return u_id;
    }

    public void setU_id(int u_id) {
        this.u_id = u_id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsAdmin() {
        return isAdmin;
    }

    public void setIsAdmin(String isAdmin) {
        this.isAdmin = isAdmin;
    }

    public User(int u_id, String username, String password, String picture, LocalDate birthday, String status, String isAdmin) {
        this.u_id = u_id;
        this.username = username;
        this.password = password;
        this.picture = picture;
        this.birthday = birthday;
        this.status = status;
        this.isAdmin = isAdmin;
    }

    public User() {

    }
}

//    @JsonCreator
//    public User(@JsonProperty("id") long id,@JsonProperty("username") String username,@JsonProperty("password") String password,@JsonProperty("gender") String gender) {
//        this.id=id;
//        this.username = username;
//        this.password = password;
//        this.gender = gender;
//    }

//    @Override
//    public boolean equals(Object obj) {
//        //return super.equals(obj);
//        User user=(User)obj;
//        if (getId()==user.getId()&&(getUsername().equals(user.getUsername()))&&(getPassword().equals(user.getPassword()))&&(getGender().equals(user.getGender())))
//            return true;
//        else
//            return false;
//
//    }